<?php
/**
 * Created by PhpStorm.
 * User: jieai
 * Date: 2017-03-22
 * Time: 21:34
 */
class  ShowAction extends  Action{
public function Show(){
    $this->assign('aa','fuck');
    $this->aa='fuck you!';
    $this->disPlay();
}

    public function Add()
    {
//        if (!IS_POST) {
//            _404('页面不存在2',U('Index/index'));
//        }
            $data=array('username'=>I('username'),
            'content'=>I('content'),
            'time'=>time());


            if (M('wish')->data($data)->add()){
                $this->Success('发布成功!','Show',0);
            }
    }

    public function Get()
    {

     echo json_encode(M('wish')->select()) ;

    }

}

